package com.twu.biblioteca;

import java.util.ArrayList;

/**
 * Created by venus on 20/09/14.
 */
public class SetUpHelper {

    static ArrayList<Movie> sampleMovies() {
        ArrayList<Movie> movies = new ArrayList<Movie>();

        movies.add(new Movie("Movie1", "Director1", 2014, 4));
        movies.add(new Movie("Movie2", "Director2", 2013, 7));
        movies.add(new Movie("Movie3", "Director3", 2010, 9));

        //this movie is unrated and checked out from library
        Movie unAvailableMovie = new Movie("Movie4", "Director4", 2011, 0);
        unAvailableMovie.setAvailable(false);
        movies.add(unAvailableMovie);

        return movies;
    }

    static ArrayList<Book> sampleBooks() {
        ArrayList<Book> books = new ArrayList<Book>();

        books.add(new Book("Book1", "Author1", 2014));
        books.add(new Book("Book2", "Author2", 2013));
        books.add(new Book("Book3", "Author3", 2012));

        //Also there is one book which is has been checked out from library
        Book nonAvailableBook = new Book("Book4", "Author4", 2011);
        nonAvailableBook.setAvailable(false);
        books.add(nonAvailableBook);

        return books;
    }

    static ArrayList<User> sampleUsers() {
        ArrayList<User> users = new ArrayList<User>();

        User sampleUser1 = new User("111-1111", "pass1");
        sampleUser1.setName("User1");
        sampleUser1.setUsername("username1");
        sampleUser1.setEmail("email1");
        users.add(sampleUser1);

        User sampleUser2 = new User("222-2222", "pass2");
        sampleUser2.setEmail("email2");
        sampleUser2.setName("User2");
        sampleUser2.setUsername("username2");
        users.add(sampleUser2);

        User sampleUser3 = new User("333-3333", "pass3");
        sampleUser3.setEmail("email3");
        sampleUser3.setName("User3");
        sampleUser3.setUsername("username3");
        users.add(sampleUser3);

        return users;
    }
}
